<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      th:replace="~{layout/layout :: layout(~{::title}, ~{::section})}">
<head>
    <title>用户详情</title>
</head>
<body>
    <section>
        <h2>用户详情</h2>
        
        <div class="user-card">
            <h3 th:text="${user.fullName}">用户姓名</h3>
            
            <p>
                <span class="label">ID:</span>
                <span th:text="${user.id}">1</span>
            </p>
            
            <p>
                <span class="label">邮箱:</span>
                <span th:text="${user.email}">user@example.com</span>
            </p>
            
            <p>
                <span class="label">性别:</span>
                <span th:text="${user.gender.displayName}">男</span>
            </p>
            
            <p>
                <span class="label">出生日期:</span>
                <span th:text="${#temporals.format(user.birthday, 'yyyy-MM-dd')}">1990-01-01</span>
            </p>
            
            <p>
                <span class="label">职业:</span>
                <span th:text="${user.profession}">工程师</span>
            </p>
            
            <p>
                <span class="label">婚姻状况:</span>
                <span th:text="${user.married ? '已婚' : '未婚'}">已婚</span>
            </p>
            
            <p th:if="${user.note}">
                <span class="label">备注信息:</span>
                <span th:text="${user.note}">用户备注信息</span>
            </p>
        </div>
        
        <div class="btn-group">
            <a th:href="@{/users/list}" class="btn">返回列表</a>
            <a th:href="@{/users/delete/{id}(id=${user.id})}" class="btn btn-danger" 
               onclick="return confirm('确定要删除此用户吗？')">删除用户</a>
        </div>
    </section>
</body>
</html> 